cmake_minimum_required(VERSION 3.20)

project(helloworld C)

add_subdirectory(hello)
add_subdirectory(world)

aux_source_directory(. ${PROJECT_NAME}_SRCS)

add_library(${PROJECT_NAME} STATIC $<TARGET_OBJECTS:hello> $<TARGET_OBJECTS:world> ${${PROJECT_NAME}_SRCS})
target_link_libraries(${PROJECT_NAME} PRIVATE hello world)

